package backserver;

import common.MyCommon;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

/**
 * Created by Administrator on 2016/1/8.
 */
@Component
public class BackUtil implements ApplicationContextAware {
    public MyCommon getMyCommon() {
        return myCommon;
    }

    public void setMyCommon(MyCommon myCommon) {
        this.myCommon = myCommon;
    }
    @Autowired
    private MyCommon myCommon;

    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        BackManager.context=applicationContext;
    }
}
